// HTTP 客户端使用示例
import { http } from '@/utils/http'

// newList AlummiCommunityList 获取文章列表
export function getArticles(params: {
  per_page?: number
  page?: number
  category?: string
} = {}) {
  return http.get('/component/production/articles', { params })
}

// CardCarouselMultiRow 获取数据
export function getPublications(params: {
  per_page?: number
  page?: number
} = {}) {
  return http.get('/media-library/publications', { params })
}

// BlessingMessage 获取数据
export function getBlessingMessages() {
  return http.get('/blessing-board/blessing-messages/list')
}

// BlessingSlider 获取数据
export function getBlessingSlider(params: {
  count?: number
} = {}) {
  return http.get('/blessing-board/blessing-messages/featured', { params })
}

// ExploreLinks 获取数据
export function getExploreLinks(params: {
  count?: number
} = {}) {
  return http.get('/templated-website/production/current-page/explore', { params })
}

// SchoolLayout 获取数据
export function getSchoolLayout(id: number) {
  return http.get(`/component/production/articles/${id}`)
}

// 通用获取数据接口
export function getList(apiLink: string, params: {}) {
  return http.get(apiLink, { params })
}
